

** Change directory


**************************
**************************
** Results from Study 1 **
**************************
**************************

	use "PolicyLearning-Study1.dta", clear
** Table 1 - Study 1 - Sample Information
	tab country open
** Table 2 - Study 1 - Own/Other Country Treatment
	reg click own if open==1
** Appendix B
	reg click own
** Appendix A - Results by country 
	bysort country: reg click own if open==1

	** Meta-analysis
	foreach country in Belgium Austria Germany Hungary Italy Netherlands {
		reg click own if open==1 & country == "`country'"
	if `"`country'"' == "Belgium"{	
		regsave own using "metan-Study1.dta", addlabel(country, `country') replace
	}
	else{
		regsave own using "metan-Study1.dta", addlabel(country, `country') append
	}
	}	
	
	** Create and Export Figure
	use metan-Study1.dta, clear
	metan coef stderr, lcols(country N) xtitle(Own Country Treatment Effect on Information Seeking) sortby(N) nobox graphregion(fcolor(white) ifcolor(white))
	gr export metan-Study1.png, replace

	
**************************
**************************	
** Results from Study 2 **
**************************
**************************

	use "PolicyLearning-Study2.dta", clear
** Table 3 - Study 2 - EU Treatment
	reg click tr_eu if open==1
** Appendix B
	reg click tr_eu
** Appendix A - Results by country 
	bysort country: reg click tr_eu if open==1

	** Meta Analysis
	foreach country in Belgium Austria Estonia Germany Hungary Italy Netherlands Sweden {
		reg click tr_eu if open==1 & country == "`country'"
	if `"`country'"' == "Belgium"{	
		regsave tr_eu using "metan-Study2.dta", addlabel(country, `country') replace
	}
	else{
		regsave tr_eu using "metan-Study2.dta", addlabel(country, `country') append
	}
	}	
	
	** Create and Export Figure
	use metan-Study2.dta, clear
	metan coef stderr, lcols(country N) xtitle(EU Treatment Effect on Information Seeking) sortby(N) nobox graphregion(fcolor(white) ifcolor(white))
	gr export metan-Study2.png, replace

	
**************************
**************************	
** Results from Study 3 **
**************************
**************************

	use "PolicyLearning-Study3.dta", clear
** Table 4 - Study 3 - 
	reg open tr_study3_own 
** Table 5 - Study 3 - 
	reg click tr_study3_own if open==1
** Appendix B
	reg click tr_study3_own
** Appendix A - Results by country 
	bysort country: reg open tr_study3_own 
	bysort country: reg click tr_study3_own if open==1

	** Meta Analysis
	foreach country in Austria Belgium Finland Germany Hungary Italy Netherlands Sweden {
		reg open tr_study3_own if country == "`country'"
	if `"`country'"' == "Austria"{	
		regsave tr_study3_own using "metan-Study3.dta", addlabel(Country, `country') replace
	}
	else{
		regsave tr_study3_own using "metan-Study3.dta", addlabel(Country, `country') append
	}
	}	

	** Create and Export Figure
	use metan-Study3.dta, clear
	metan coef stderr, lcols(Country N) xtitle(Own Country Treatment Effect on Information Seeking) sortby(N) nobox graphregion(fcolor(white) ifcolor(white))
	gr export metan-Study3.png, replace


*******************************************************
*******************************************************
** POWER - Calculating the Minimal Detectable Effect **
*******************************************************
*******************************************************
	power oneproportion .2, n(800) power(.8) 
	power oneproportion .3, n(3150) power(.8) 	
	
	power twoproportion .2, n(800) power(.8) 
	power twoproportion .3, n(3150) power(.8) 	
